package v1

type PageData struct {
	Count       int  `json:"count"`
	Page        int  `json:"page"`
	PageSize    int  `json:"page_size"`
	HasNextPage bool `json:"has_next_page"`
}

func NewPageData(count, page, pageSize int) *PageData {
	ret := new(PageData)
	ret.Count = count
	ret.Page = page
	ret.PageSize = pageSize
	if count < pageSize {
		ret.HasNextPage = false
	} else {
		ret.HasNextPage = true
	}
	return ret
}
